<template>
  <div>
    <h2>App组件</h2>
    <p>APP中的p标签</p>
    <button @click="aaa">调用子组件的方法</button>
    <my-test ref="myTest"></my-test>
    <my-abc></my-abc>
  </div>
</template>

<script>
import MyAbc from './components/MyAbc.vue';
import MyTest from "./components/MyTest.vue";
export default {
  components: { MyTest, MyAbc },
  methods:{
    aaa(){
      this.$refs.myTest.getP()
    }
  }
};
</script>

<style></style>
